package org.example.project.entity;

import java.sql.Timestamp;

/**
 * @Author 岩
 * @Package org.example.project.entity
 * @Project MyApp
 * @Name Post
 * @Date 2024-04-27 14:58
 * @Filename Post
 */
public class Post {
    private int id;
    private String title;
    private String content;
    private String imgUrl;
    private int userId;
    private int likes;

    private int commentsCount;
    private Timestamp createDate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public int getCommentsCount() {
        return commentsCount;
    }

    public void setCommentsCount(int commentsCount) {
        this.commentsCount = commentsCount;
    }

    @Override
    public String toString() {
        return "Post{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", userId=" + userId +
                ", likes=" + likes +
                ", commentsCount=" + commentsCount +
                ", createDate=" + createDate +
                '}';
    }
}
